MailSniffer is a minimal POP client that interacts with any POP3 server to count the messages in a user's mailbox. MailSniffer will optionally list the subjects and senders of either new or all messages. MailSniffer can also optionally perform several actions, such as run a script, when the mailbox contains more than a user specified number of messages. For example, MailSniffer could be configured to run a script that displays a dialog box when there are more than 9 messages in a mailbox. MailSniffer can be configured to sniff automatically at a user specified interval. MailSniffer is fully asynchronous and supports multiple simultaneous sniffs. If a user has multiple email accounts, MailSniffer can automatically sniff all of them at the same time and execute different scripts for each of them.
¥ What do I need to run MailSniffer?
¥ A 68020 or better Macintosh
¥ System 7 (7.5 is probably best)
¥ MacTCP 2.0.4 (2.0.6 is probably best)
These two things are optional but recommended:
¥ Internet Config 1.1 or later (though it will probably work with earlier versions)
¥ AppleScript if you want MailSniffer to run scripts
Running MailSniffer with a 512K partition should be sufficient for several sniffers to be open at once. If this isn't sufficient, make the partition larger.
¥ How much does MailSniffer cost?
MailSniffer is free. We would appreciate an email message if you use MailSniffer.
¥ How do I use MailSniffer?
Run MailSniffer and choose New from the File menu. A new, untitled, sniffer window will appear. A sniffer window is divided into two parts. At the top is a status pane, which is where MailSniffer will display the status of a sniff in progress. Under the status pane is the log pane, which is where MailSniffer will report the results of a sniff.
Choose Setup... from the Sniffer menu to open a sniffer's setup window. The setup window is divided into two sections: User Info and Sniffer Info. Information about the user's mail account is specified in the User Info section. If Use Internet Config is selected, then MailSniffer will obtain the mail account information from the Internet Config preferences file. If Custom is selected, then the mail account information can be custom configured in the setup window.
A few notes about using Internet Config. MailSniffer assumes that Internet Config has been installed and the user's preferences have been set correctly. If the preferences have not been set, then MailSniffer will attempt to run Internet Config for the user (after asking whether Internet Config should be launched). If the Internet Config application is not found, then MailSniffer will default to the user info specified under Custom in the setup window.
Sniffing options are specified in the Sniffer Info section of the setup window. Use the popup menu to indicate whether MailSniffer should sniff for new mail, or all mail. To have MailSniffer automatically sniff at predefined intervals, enter a positive number into the ÒCheck messages every __ minutes.Ó option. Setting this option to zero will disable automatic sniffing. Any positive value will have MailSniffer sniff at the specified interval. Note that if a small value is chosen, such as one minute intervals, MailSniffer may still be involved in a sniff when the interval has passed. In order to avoid this problem, MailSniffer starts counting for the next sniff at the end of the last sniff, regardless of how long the last sniff might take. This includes the execution of any scripts, which may also take longer than the specified sniff interval.
MailSniffer can be configure to perform several actions when a specified number of messages have accumulated in the mailbox. Specifying a value of zero will make MailSniffer perform these actions whenever there are messages in the mailbox. Note that MailSniffer counts messages based on the value of the New/All popup menu. If MailSniffer is only sniffing new messages, then only new messages trigger actions.
The most important action MailSniffer can perform is the Run Script action. To specify a script click the Specify Script button. A Standard File Dialog box will appear allowing the user to select the script to run. Any text or compiled script can be chosen. Application scripts cannot be chosen. Also indicate in the setup window how many messages must be in the mailbox before the script will run.
Two other actions MailSniffer can be configured to perform are the Save Log action, which saves the log to a specified file, and the Clear Log action, which clears the log pane after the all other actions have been performed. These actions are intended to be used together with the Run Script action. For example, a script could be written that processes the log file and performs a special action based on the contents (beeping if mail has arrived from Jane, for example). Such a script will only work if the log file lists only the newest messages. The Clear Log option makes sure that the log file contains only the most recent messages. If Save Log is checked but Clear Log is unchecked, then the log file will become a history of all the sniffs that have been performed.
One other trigger action is notification using the Notification Manager. To enable notification, check Notify and type in a line of text in the corresponding field. The text entered will appear in a the notification alert.
Be sure to close the setup window. Any changes to a sniffer's setup take place only after the setup window has been closed.
To begin a sniff, choose Sniff from the Sniffer menu. MailSniffer will connect to the POP server, count the messages in the users mailbox, and display the results in the log pane. Any errors will be displayed in the status pane. If the List Messages option has been selected, then MailSniffer will list the subject and sender of each message in the log page.
To list all the messages in the mailbox at any time, choose List from the Sniffer menu. This action will not cause the trigger actions to be performed, regardless of how many messages are in the mailbox.
To simply count all of the messages in the mailbox, choose Count from the Sniffer menu. This action will not cause the trigger actions to be performed, regardless of how many messages are in the mailbox.
Sniffer settings can be saved to a file. Once the sniffer has been setup, choose Save from the File menu. For untitled sniffers, a Standard File Dialog will appear prompting the user to specify a new file. Note the MailSniffer saves all text (password, username, POP server) in a scrambled format.
The log pane can be printed by choosing Print... from the File menu. The contents of the log pane can also be saved as a TEXT file by choosing Save Messages... from the File menu. Choosing Clear Log in the File menu will clear the log pane.
Multiple sniffers may be open at the same time in MailSniffer. Simply open them by either choosing Open... from the File menu, or doubleÐclicking their icon in the Finder. MailSniffer will perform sniffs for all open sniffers at the same time.
¥ What are the limitations on distributing MailSniffer?
MailSniffer is free, but it is not Òpublic domainÓ. It is copyrighted, and KiSS Software reserves all rights. In particular:
¥ MailSniffer cannot be sold, either by itself or in combination with any other product, without express written permission of KiSS Software.
¥ User groups publishing a CD-ROM or floppy collection may include MailSniffer and all of its included files without restriction, save that the original package is included.
¥ Hard disk companies that distribute PD, shareware, and freeware on disk drives may distribute MailSniffer.
¥ Commercial publishers and distributors of CD-ROM software collections may not distribute MailSniffer on CD-ROM without the express written permission of KiSS Software.
¥ MailSniffer may be posted on an information service that charges its users for general connection time and downloading, but it may NOT be posted to an information service that will charge for the specific right to download MailSniffer, without the express written permission of KiSS Software.
¥ MailSniffer may be given away as a support utility for a package which is itself to be given away.
MailSniffer and any support from KiSS Software are provided Òas isÓ and without warranty, express and implied, including but not limited to any implied warranties of merchantability and fitness for a particular purpose. In no event will KiSS Software be liable for any damages, including lost profits, lost savings, or other incidental or consequential damages, even if KiSS Software is advised of the possibility of such damages, or for any claim by you or any third party.
¥ Version History
v1.1.0
¥ Support for Internet Config
¥ Now sniffs either new or all mail
¥ Saves all text info in a scrambled format for security
¥ Renamed and fixed Documentation file (had two copies in one file)
¥ Redesigned the setup window
¥ Two new trigger actions: Save Log and Clear Log
v1.1.1
¥ Added ability to use the Notification Manager
¥ Increased the length of the strings used to store POP server
¥ Removed about box picture
v1.1.2
¥ Removed MacsBug symbols, which reduced the program size by 50K (!)
¥ Moved (almost) all strings into STR# resources to simplify localization
¥ Some bug fixes
v1.1.3
¥ Fixed a header parsing bug that hangs MailSniffer
¥ The dialog box that comes up when quitting takes too long was being created many times
¥ Fixed a problem where MailSniffer was taking a long time to quit when in the middle of a sniff
v1.1.4
¥ Added Debug to the Sniffer menu
¥ Clear Log and Save Log were permanently disabled
¥ Fixed a bug whereby a LIST command was issued in place of a UIDL command
¥ Fixed a bug whereby non-multiline messages weren't always being received correctly
¥ Fixed a bug involving checking for server errors
¥ Acknowledgments
Eric Scouten for TurboTCP, though I had to modify it to run under PowerPlant.